<template>
    <h1>用户借款信息(管理员)</h1>

    <table>
        <thead>
            <tr>
                <th>借款人</th>
                <th>借款金额</th>
                <th>借款时间</th>
                <th>借款项目名称</th>
                <th>借款年限</th>
                <th>借款利息</th>
            </tr>
        </thead>

        <tbody>
            <tr  v-for="item in Info">
                <td>{{ item.UI_Name}}</td>
                <td>{{ item.UB_Money }}</td>
                <td>{{ item.UB_Date.substring(0,10)}}</td>
                <td>{{ item.BM_Name }}</td>
                <td>{{ item.BM_Year }}</td>
                <td>{{ item.BI_Name }}</td>
                
            </tr>
        </tbody>

    </table>


</template>

<script setup lang="ts">
import {ref,onMounted} from 'vue';
import axios from 'axios';

const Info = ref([{
    UI_Name:'',
    UB_Id:0,
    UB_Money:0,
    UB_Date:'',
    BM_Name:'',
    BM_Year:0,
    BI_Name:0,
}])





onMounted (()=>{
    axios({
        method:'get',
        url:"http://localhost:61480/api/Borrow/AliUserBorrowShowData",
        
    })
    .then((res)=>{
        console.log(res.data);
        
        Info.value = res.data;
    })
    .catch((err)=>{
        console.log(err);
    })
})



</script>
